﻿using System;
using System.Collections.Generic;
using Jinjia.Approve.Model.VM.JJFlow.DTO;

namespace Jinjia.Approve.Model.VM.JJFlow
{
    ///<summary>
    ///jj_flow_trackVM对象
    ///</summary>
    public class JjFlowTrackVM
    {
        public int id { get; set; }

        /// <summary>
        /// 实例任务ID
        /// </summary>
        public int instance_id { get; set; }

        /// <summary>
        /// 操作结果
        /// </summary>
        public int operation_result { get; set; }

        /// <summary>
        /// 当前节点ID
        /// </summary>
        public int node_id { get; set; }

        /// <summary>
        /// 当前节点名称
        /// </summary>
        public string node_name { get; set; }

        /// <summary>
        /// 类型
        /// </summary>
        public int action_type { get; set; }

        /// <summary>
        /// 类型名称
        /// </summary>
        public string action_type_name { get; set; }

        /// <summary>
        /// 来自节点
        /// </summary>
        public int from_node { get; set; }

        /// <summary>
        /// 来自节点名称
        /// </summary>
        public string from_node_name { get; set; }

        /// <summary>
        /// 去往节点
        /// </summary>
        public int to_node { get; set; }

        /// <summary>
        /// 去往节点名称
        /// </summary>
        public string to_node_name { get; set; }

        /// <summary>
        /// 来自人员
        /// </summary>
        public string from_emp { get; set; }

        /// <summary>
        /// 来自人员名称
        /// </summary>
        public string from_emp_name { get; set; }

        /// <summary>
        /// 去往人员
        /// </summary>
        public string to_emp { get; set; }

        /// <summary>
        /// 备注
        /// </summary>
        public string remark { get; set; }

        public int create_user_id { get; set; }
        public DateTime create_time { get; set; }
        public int update_user_id { get; set; }
        public DateTime update_time { get; set; }

        /// <summary>
        /// 操作时间
        /// </summary>
        public DateTime op_time => this.node_status_type == 0 ? this.create_time : default;

        /// <summary>
        /// 审批类型  0 或签 1 会签
        /// </summary>
        public int emp_type { get; set; }

        /// <summary>
        /// 序列
        /// </summary>
        public int sequence { get; set; }

        /// <summary>
        /// 节点人员名称
        /// </summary>
        public string emp_name { get; set; }

        /// <summary>
        /// 节点状态类型  0 历史节点   1 当前节点  2 未来节点
        /// </summary>
        public int node_status_type { get; set; }

        /// <summary>
        /// 审批人信息
        /// </summary>
        public List<EmpInfo> emp_list { get; set; }
    }
}